package com.adcc.foc.domain;

import java.io.*;

/**
 * Created by houxy on 2016/8/5.
 */
public class App implements Serializable {
    private String url;
    private String name;
    private String icon;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public static String ReadFile(String path) {
        FileInputStream fis = null;
        InputStreamReader isr = null;
        BufferedReader reader = null;
        String laststr = "";
        try {
            fis = new FileInputStream(path);
            isr = new InputStreamReader(fis, "utf-8");
            reader = new BufferedReader(isr);
            String tempString = null;
            while ((tempString = reader.readLine()) != null) {
                laststr = laststr + tempString.trim();
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (reader != null) {
                try {
                    reader.close();
                } catch (IOException e1) {
                }
            }
        }
        return laststr;
    }
}
